﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SLIC.Models.ChangePasswordModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ChangePassword
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Change Password</h2>

        <%
        /// <summary>
        /// 
        ///  <title>SLIC</title>
        ///  <description>Change Password page for Change the password </description>
        ///  <copyRight>Copyright (c) 2011</copyRight>
        ///  <company>IronOne Technologies (Pvt)Ltd</company>
        ///  <createdOn>2011-08-05</createdOn>
        ///  <author></author>
        ///  <modification>
        ///     <modifiedBy></modifiedBy>
        ///      <modifiedDate></modifiedDate>
        ///     <description></description>
        ///  </modification>
        ///
        /// </summary>                                                                                 
    %>

         
    <% using (Html.BeginForm())
       {%>
    <%  ModelState err = ViewContext.ViewData.ModelState["err"];
        SLIC.Controllers.GenException result = null;

        if (err != null)
        {
            result = (SLIC.Controllers.GenException)err.Errors.ElementAt(0).Exception;
    %>
    <%:result.Message %>
    <%  }%>
    <%: Html.ValidationSummary(true) %>
    <div id="innerContainer" style="width: 350px;padding-top:10px;">
        <fieldset style="width: 90%">
            <table border="0" cellspacing="0" cellpadding="0" style="color: #000;">
                <tr class="odd" style="border: solid 1px #aaa;">
                    <td class="normaltdsForm" style="width: 135px; border-top: solid 1px #aaa;padding-bottom:5px;">
                        <%: Html.LabelFor(model => model.OldPassword) %>
                    </td>
                    <td class="colontdsForm">
                        :
                    </td>
                    <td class="normaltds" style="width: 145px; border-top: solid 1px #aaa;padding-right:0px;padding-bottom:5px;">
                        <%: Html.PasswordFor(model => model.OldPassword,new{OnKeyPress="return AlphanumericValidation(event);"}) %>
                      <font color="red">   <%: Html.ValidationMessageFor(model => model.OldPassword) %>
                     </font></td>
                </tr>
                <tr class="even">
                    <td class="normaltdsForm" style="width: 135px;padding-bottom:5px;">
                        <%: Html.LabelFor(model => model.NewPassword) %>
                    </td>
                    <td class="colontdsForm">
                        :
                    </td>
                    <td class="normaltds" style="padding-right:0px;padding-bottom:5px;">
                        <%: Html.PasswordFor(model => model.NewPassword,new{OnKeyPress="return AlphanumericValidation(event);"})%>
                           <font color="red"> <%: Html.ValidationMessageFor(model => model.NewPassword) %>
                 </font>   </td>
                </tr>
                <tr class="odd">
                    <td class="normaltdsForm" style="width: 135px;padding-bottom:5px;">
                        <%: Html.LabelFor(model => model.ConfirmPassword) %>
                    </td>
                    <td class="colontdsForm">
                        :
                    </td>
                  <td class="normaltds" style="padding-right:0px;padding-bottom:5px;">
                        <%: Html.PasswordFor(model => model.ConfirmPassword,new{OnKeyPress="return AlphanumericValidation(event);"})%>
                         <font color="red">     <%: Html.ValidationMessageFor(model => model.ConfirmPassword) %>
                 </font>   </td>
                </tr>
            </table>
        </fieldset>
    </div>
    <br />
    <div class="buttons">
        <input type="submit" value="Change Password" class="button" />
        <%-- <input type="submit" onclick="parent.location='<%: Url.Action("Index", "Default") %>';return false;" value="Home" class="button"/>--%>
    </div>
    <% } %>
    <%--
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>--%>
</asp:Content>
